package com.opeace

class Person {
    static searchable = true
    public enum Gender {MALE, FEMALE, TRANSGENDER}
    public enum State { ALABAMA, ALASKA, AMERICAN_SAMOA, ARIZONA, ARKANSAS, CALIFORNIA, COLORADO, CONNECTICUT,
        DELAWARE, DISTRICT_OF_COLUMBIA, FLORIDA, GEORGIA, GUAM, HAWAII, IDAHO, ILLINOIS, INDIANA, IOWA, KANSAS,
        KENTUCKY, LOUISIANA, MAINE, MARYLAND, MASSACHUSETTS, MICHIGAN, MINNESOTA, MISSISSIPPI, MISSOURI, MONTANA,
        NEBRASKA, NEVADA, NEW_HAMPSHIRE, NEW_JERSEY, NEW_MEXICO, NEW_YORK, NORTH_CAROLINA, NORTH_DAKOTA,
        NORTHERN_MARIANAS_ISLANDS, OHIO, OKLAHOMA, OREGON, PENNSYLVANIA, PUERTO_RICO, RHODE_ISLAND, SOUTH_CAROLINA,
        SOUTH_DAKOTA, TENNESSEE, TEXAS, UTAH, VERMONT, VIRGINIA, VIRGIN_ISLANDS, WASHINGTON, WEST_VIRGINIA, WISCONSIN,
        WYOMING}


    static hasMany = [programs: PersonProgram, relationships1: PersonPerson, relationships2: PersonPerson,
                      forms: PersonForm]
    static mappedBy = [relationships1: "person1", relationships2: "person2"]
    
    String firstName
    String lastName
    String middleName
    Date birthDate
    Gender gender
    String addressLine
    String addressAPT
    State addressState
    String addressCity
    int addressZip
    String homePhone
    Date dateCreated


    static constraints = {
//        addressZip(nullable: true)
    }
}


